package common.server.redis.jedis;


import common.server.redis.RedisClient;
import common.server.redis.RedisResource;
import common.server.redis.jedis.pool.JedisSentinelReadOrWritePool;

/**
 * JedisSentinel  读写分离操作
 * @author Administrator
 * @version [版本号, 2017/11/22 0022]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class DefaultJedisSentinelClient implements RedisClient {

    private JedisSentinelReadOrWritePool pool;


	public DefaultJedisSentinelClient(JedisSentinelReadOrWritePool pool) {
        this.pool =pool;
    }

    @Override
    public RedisResource getWriteResource() {
        return  this.pool.getWriteResource();
    }

    @Override
    public RedisResource getReadResource() {
        return this.pool.getReadResource();
    }
}
